#import <Foundation/Foundation.h>


@interface FWPreferences : NSObject
{
    NSDictionary* preferences;
    NSString* filename;
}


@property (readonly, retain) NSDictionary* preferences;
@property (readonly, retain) NSString* filename;


- (id)initWithPreferences:(NSDictionary*)pref;
- (id)initWithFile:(NSString*)file;
- (void)dealloc;

- (NSString*)stringValue:(NSString*)name withDefault:(NSString*)def;
- (BOOL)boolValue:(NSString*)name withDefault:(BOOL)def;
- (int)intValue:(NSString*)name withDefault:(int)def;

- (void)persist;
    
@end
